package com.javakc.mes.orderManagement.entiy;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.javakc.mes.instruction.entity.Instruction;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Setter
@Getter
@ApiModel(value = "查询调度指令库管理")
@TableName(value = "mes_order_management")
public class OrderManagement {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id")
    private int id;

    @ApiModelProperty(value = "指令库外键ID")
    @TableField(value = "ins_id")
    private int insId;

    @ApiModelProperty(value = "受理外键ID")
    @TableField(value = "acc_id")
    private int accId;

    @ApiModelProperty(value = "调度指令编号")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @TableField(value = "numbering")
    private Date numbering;

    @ApiModelProperty(value = "指令下达人")
    @TableField(value = "give_people")
    private String givePeople;

    @ApiModelProperty(value = "指令传达人")
    @TableField(value = "communicate_people")
    private String communicatePeople;

    @ApiModelProperty(value = "下达时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "give_time")
    private Date giveTime;

    @ApiModelProperty(value = "指令下达状态")
    @TableField(value = "is_instruction_state")
    private int isInstructionState;

    @ApiModelProperty(value = "指令状态")
    @TableField(value = "is_order_status")
    private int isOrderStatus;

    @ApiModelProperty(value = "创建时间", example = "2022-12-12 9:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "gmt_create",fill=FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间", example = "2022-12-12 9:00:00")
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date gmtModified;

    @TableField(exist = false)
    private Instruction instruction;
}
